<?php
class mydispatch{
	public static $params = '';
	public static function to($con,$act,$params=array()){
		global $request,$router;		
		$router->setCon($con);
		$router->setAct($act);
		self::$params = $params;

		require_once($router->getControllerFile());
		$objName = $router->getControllerName();
		
		$obj = new $objName($request);
		$actName = $router->getActName();
		$obj->$actName($request);
		$obj->render($request,$router);//渲染
	}
	

}
?>